package com.yanzhu.service.impl;

import com.yanzhu.service.RankService;
import com.yanzhu.service.mapper.RankMapper;
import com.yanzhu.service.model.Rank;
import com.yanzhu.service.model.mix.RankInfo;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 方炎柱
 * @Description:
 * @Date: Created in 15:20 2018/2/5
 * @Modified:
 */
@AllArgsConstructor
@Service
public class RankServiceImpl implements RankService {
    private RankMapper rankMapper;

    @Override
    public int insert(Rank rank) {
        return rankMapper.insert(rank);
    }

    @Override
    public List<RankInfo> queryVideoLikeRank(long vid) {
        return rankMapper.queryVideoLikeRank(vid, 10);
    }
}
